<!--
Needs a mainLayer div to work.
Needs to have the name of servlet of the client : clientName.
Needs to have the name of the div to be modified after validating the popup : modifDiv.
-->

<script type="text/javascript" src="javascript/prototype.js"></script>
<script type="text/javascript" src="javascript/rico.js"></script>
<script language="JavaScript">
<!--
	function openStructurePopup() {
		document.getElementById('structurePopup').style.visibility = "visible";
		document.getElementById('mainLayer').style.visibility = "hidden";
	}
	
	function closeStructurePopup() {
		// Send the structure id to the manager
		ajaxEngine.registerRequest('sendId','<%=clientName%>');
		ajaxEngine.registerAjaxElement('<%=modifDiv%>');
		var var1 = new Date() ;
		var var2 = var1.getTime() ;
		ajaxEngine.sendRequest('sendId', "method=structureSelected","myTime="+var2,
			"structureId="+document.forms["<%=formName%>"].idStructure.value);
	
		document.getElementById('structurePopup').style.visibility = "hidden";
		document.getElementById('mainLayer').style.visibility = "visible";
	}
-->
</script>

<div id="structurePopup" class="modalPopup">
	<%@include file="selectStructure.jsp"%>
	<a href="javascript:closeStructurePopup();">
		<bean:message key="action.close"/>
	</a>
</div>